package com.example.firstprojectnew.config;

import com.example.firstprojectnew.interceptor.MyInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author: lihua
 * @Date: 2025/3/18 16:11
 * @Version: v1.0.0
 * @Description:
 **/

public class WebConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new MyInterceptor())
                .addPathPatterns("/first/**")
                .excludePathPatterns("/first/login");
    }
}
